package com.headingdata.d7_interface_demo;

import com.headingdata.d4_abstract.A;

import java.util.ArrayList;

public class ClassManager {

    private ArrayList<Student> students = new ArrayList<>();
    private StudentOperator studentOperator = new StudentOperatorImp2();

    public ClassManager(){
        students.add(new Student("迪丽热巴","女",99));
        students.add(new Student("古力娜扎","女",90));
        students.add(new Student("马儿扎哈","男",88));
        students.add(new Student("卡尔扎巴","男",66));
    }

    public void  printAllStudentInfo(){
        studentOperator.printAllStudentInfo(students);
    }

    public void  printAllStudentAverage(){
        studentOperator.printAllStudentAverage(students);
    }
}
